const resultLabel = document.querySelector('#result-label');
const resultColor = document.querySelector('#result-color');
const resultText = document.querySelector('#result-text');

export const hidePanel = () => {
  resultLabel.classList.add('hidden');
  resultColor.classList.add('hidden');
  resultText.classList.add('hidden');
}

export const showPanel = (pixelInfo) => {
  resultLabel.classList.remove('hidden');
  resultColor.classList.remove('hidden');
  resultText.classList.remove('hidden');
  resultColor.style.backgroundColor = `rgb(${pixelInfo.r}, ${pixelInfo.g}, ${pixelInfo.b})`;
  resultText.innerHTML = `R:${pixelInfo.r} G:${pixelInfo.g} B:${pixelInfo.b} ${pixelInfo.hex}`;
};
